

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>表单组合</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/layuikn/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC__/layuikn/style/admin.css" media="all">
</head>

<style>
    #zyzlzd .layui-form-checkbox{
        margin-top: 10px;
    }
    .layui-form-radio{
        margin: 0;
    }
    .layui-form-label{
        width: 180px;
    }
</style>

<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header"><h2>人体测量与成分分析</h2></div>
        <div class="layui-card-body" style="padding: 15px;">
            <fieldset class="layui-elem-field" style="padding: 20px;">
                <legend style="font-size: 15px;">个人信息</legend>
                <div class="layui-row">
                    <div class="layui-col-md4">住院号：<span id="huanzhe_hospital_id"></span></div>
                    <div class="layui-col-md4">姓名：<span id="huanzhe_name"></span></div>
                    <div class="layui-col-md4">性别：<span id="huanzhe_gender"></span></div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md4">科室：<span id="huanzhe_keshi"></span></div>
                    <div class="layui-col-md4">年龄：<span id="huanzhe_age"></span></div>
                    <div class="layui-col-md4">录入日期：<span id="huanzhe_created"></span></div>
                </div>
            </fieldset>
            <form class="layui-form" action="" lay-filter="renticeliang-form">
                <fieldset class="layui-elem-field" style="padding: 20px;">
                    <legend style="font-size: 15px;">人体测量与成分分析</legend>
                    <div>
                        <div style="font-weight: 600;">1、人体成分分析</div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">体脂肪量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tizhi"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">体脂肪率</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tizhi_lv"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">(%)</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">非脂肪量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="feizhi"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">肌肉量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="jirou"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">推定骨量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tuiding"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>

                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">蛋白质量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="danbaizhi"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="shuifen"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分率</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="shuifen_lv"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">(%)</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">细胞外液量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="waiye"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">细胞内液量</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="neiye"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">基础代谢</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="daixie"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">Kcal</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">内脏脂肪等级</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="zhifangdengji"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">体型</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tixing"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">厂家及型号</label>
                                    <div class="layui-input-inline" style="width: 250px;">
                                        <input type="text" name="changjiaxinghao"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">相位角</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xiangweijiao"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div style="font-weight: 600;">2、人体测量</div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">身高</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="shengao"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">cm</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">体重</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tizhong"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">BMI</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="bmi"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg/m2</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">上臂中点周径(MAC)</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="amc"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">cm</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">三头肌皮褶厚度(TSF)</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tsf"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mm</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">非利手（或非损伤）手握力</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="woli"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">kg</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">上臂肌肉周径(MAMC)</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="mamc"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">cm</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">小腿最大周径：右小腿</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="right_tui"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">cm</div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">左小腿</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="left_tui"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">cm</div>
                                </div>
                            </div>
                        </div>
                    </div>

                </fieldset>
                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button class="layui-btn" lay-submit="" lay-filter="last">上一步</button>
                            <button class="layui-btn" lay-submit="" lay-filter="next">下一步</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>


<script src="__STATIC__/layuikn/layui/layui.js"></script>
<script>
    layui.config({
        base: '__STATIC__/layuikn/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
        ,ajaxData:'../extends/ajaxData'
        ,getOption:'../extends/getOption'
    }).use(['index', 'jquery', 'ajaxData', 'getOption', 'form', 'laydate'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,ajaxData = layui.ajaxData
            ,getOption = layui.getOption
            ,form = layui.form;

        var pid = sessionStorage.getItem('pid');
        ajaxData.ajaxData('GET',"{:url('patient/info')}?pid=" + pid,{},function (back) {
            if(back.data){
                $('#huanzhe_hospital_id').html(back.data.hospital_id);
                $('#huanzhe_name').html(back.data.name);
                $('#huanzhe_gender').html(back.data.gender);
                $('#huanzhe_keshi').html(back.data.keshi);
                $('#huanzhe_age').html(back.data.age);
                $('#huanzhe_created').html(back.data.created);
            }

            form.render();
        });

        ajaxData.ajaxData('GET',"{:url('renticeliang/info')}?pid=" + pid,{},function (back) {
            if(back.data){
                //back.data.xsh_q_baidanbai_dw = "" + back.data.xsh_q_baidanbai_dw
                //给表单赋值
                form.val("renticeliang-form", back.data);
            }
            form.render();
        });
        form.on('submit(last)',function(data){
            if(pid == 'null') return  false;
            window.location.href = "{:url('shiyanshi/show')}";
            return  false;
        });
        /* 监听提交 */
        form.on('submit(next)', function(data){
            if(pid == 'null') return  false;
            ajaxData.ajaxData('POST', "{:url('renticeliang/update')}?pid=" + pid, data.field,function (back) {
                if(back.code == 200){
                    window.location.href = "{:url('pgsgahuanzhe/show')}";
                }else{
                    layer.msg(back.msg, {icon: 5});
                }
            });
            // parent.layer.alert(JSON.stringify(data.field), {
            //     title: '最终的提交信息'
            // })
            return false;
        });

    });
</script>
</body>
</html>
